<template>
    <div class="cont">
        <el-tabs v-model="activeName" class="demo-tabs" style="width: 100%; height: 100%;">
            <el-tab-pane label="操作日志" name="first" style="background-color: #fff;height: 95%;">
                <div class="fit">
                    <el-table :data="systems" height="100%" style="width: 100%;" >
                        <el-table-column prop="adminName" label="管理员" width="100px"/>
                        <el-table-column label="登陆时间">
                            <template #default="scope">
                                {{scope.row.loginTime}}
                            </template>
                        </el-table-column >
                        <el-table-column prop="operate" label="操作" />
                    </el-table>
                    <div class="footer">
                        <el-pagination
                            background
                            layout="prev, pager, next"
                            :page-size="pageSize"
                            :page-count="total"
                            @current-change="pageChange"/>
                    </div>
                </div>
            </el-tab-pane>
            <el-tab-pane label="银行卡" name="second">
            </el-tab-pane>
            <el-tab-pane label="微信" name="third">
            </el-tab-pane>
            <el-tab-pane label="支付宝" name="fourth">
            </el-tab-pane>
        </el-tabs>
       </div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import axios from 'axios';
let BaseUrl='http://192.168.199.11:8001/ShoppingStreet';
onMounted(() => {
    fuis();
    console.log(asd);
    
})
let activeName = ref('first');
let asd = new Date()    
//操作日志
let pageIndex = ref(1);
let pageSize = ref(12); 
let systems = ref([]);
let total = ref(0);
function pageChange(val){
    pageIndex.value = val;
    fuis();
}
function fuis(){
    axios.defaults.headers.common['token'] = localStorage.getItem("token");
    axios.post(`${BaseUrl}/system/systemList`,{
        pageIndex:pageIndex.value,
        pageSize:pageSize.value,
        adminId:localStorage.getItem("adminId"),
    })
   .then(function(res){
        console.log(res);
        systems.value=res.data.data.systems;
        total.value=res.data.data.pageCount;
    })
}
//时间

</script>
<style scoped lang="less">
.cont {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: #F5F5F5;

    position: relative;
}
:deep(.el-tabs__header){
    padding: 0  3% 0;
    background-color: #fff;
    margin: 0;
}
:deep(.el-tabs__content){
    background-color: #F5F5F5;
    padding: 1% 3% 1%;
}
:deep(.el-tabs__nav-wrap:after){
    display: none;
}

    :deep(.el-table td.el-table__cell){
       border-bottom: none;
   }
   :deep(.el-table__inner-wrapper:before){
    display: none;
   }
   :deep(.el-table .cell){
    text-align: center;
   }
   
   .fit{
    width: 100%;
    height: 100%;
    position: relative;
    .footer{
        width: 100%;
        height: 10%;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        position: absolute;
        left: 0;
        bottom: 0px;
        .el-pagination{
            justify-content: center;
        }
    }
   }
</style>